/**
 * 
 */
package wpmp.utils.quickbean;

import java.io.Serializable;
import java.util.ArrayList;
import java.util.List;

/**
 * @author Wayne.Wang<5waynewang@gmail.com>
 * @since 11:38:32 AM Dec 4, 2013
 */
public class UserPermission implements Serializable {

	private static final long serialVersionUID = -8100760062534643678L;

	private User user;

	private List<Entry> resources = new ArrayList<Entry>();

	private long createTime;

	private String securityId;

	public UserPermission() {
		this.createTime = System.currentTimeMillis();
	}

	public UserPermission(User user) {
		this();
		this.user = user;
	}

	public String getSecurityId() {
		return securityId;
	}

	public void setSecurityId(String securityId) {
		this.securityId = securityId;
	}

	public User getUser() {
		return user;
	}

	public void setUser(User user) {
		this.user = user;
	}

	public List<Entry> getResources() {
		return resources;
	}

	public void setResources(List<Entry> resources) {
		this.resources = resources;
	}

	public long getCreateTime() {
		return createTime;
	}

	public void setCreateTime(long createTime) {
		this.createTime = createTime;
	}

	// 资源列表
	public static class Entry implements Serializable {

		private static final long serialVersionUID = 1L;

		private String baseUrl;
		private String operations;
		private String actionName;
		private String level;

		public String getLevel() {
			return level;
		}

		public void setLevel(String level) {
			this.level = level;
		}

		public String getActionName() {
			return actionName;
		}

		public void setActionName(String actionName) {
			this.actionName = actionName;
		}

		public String getBaseUrl() {
			return baseUrl;
		}

		public void setBaseUrl(String baseUrl) {
			this.baseUrl = baseUrl;
		}

		public String getOperations() {
			return operations;
		}

		public void setOperations(String operations) {
			this.operations = operations;
		}

	}
}
